package kr.hkit.powerjava.chapter12.Programming;

public class Book {

	private int number;
	private String title;
	private String author;
	
	protected int h;
	
	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Book){
			if(this.number == ((Book)obj).number)
				return true;
		}
		return false;
	}

	@Override
	public String toString() {
		return String.format("Book [number=%s, title=%s, author=%s]", number,
				title, author);
	}
	
	
}
